<!DOCTYPE html>
<html lang="zh">
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta http-equiv="X-UA-Compatible" content="ie=edge">
		<script src="./lib/vue.js" type="text/javascript" charset="utf-8"></script>
		<title></title>
	</head>
	<body>
		<div id="app">
			<h1>点击次数:{{ count }}</h1>
			<!-- 可以使用表达式完成事件操作 -->
			<button type="button" @click="count+=1">点击</button>
			<!-- 获取事件对象 -->
			<button type="button" @click="clickEvent">获取事件对象</button>
		</div>
	</body>
	<script type="text/javascript">
		var app = new Vue({
			el:"#app",
			data:{
				count:0
			},
			methods:{
				clickEvent:function(event){
					console.log(event);// 获取事件对象
					console.log(this);// this指向app
					this.count++;
				}
			}
		})
	</script>
</html>